package com.javasea.patterns.mario.state;

import com.javasea.patterns.mario.MarioStateContext;

/**
 *@ClassName FireMario
 *@Description TODO
 *@Author longxiaonan@163.com
 *@Date 2022/4/28 0028 22:42
 */
public class FireMario extends AbstractMario {

    private static FireMario instance = new FireMario();

    private FireMario() {
    }

    @Override
    public State getName(){
        return State.FIRE;
    }

    public static FireMario getInstance(){
        return instance;
    }

    @Override
    public void meetMonster(MarioStateContext stateMachine) {
        stateMachine.setCurrentState(SmallMario.getInstance());
        stateMachine.setScore(stateMachine.getScore() - 300);
    }




}
